package ch09.shili;

import java.io.*;

public class S05_2 {

    public static void main(String[] args) throws IOException {
        InputStream fis = new FileInputStream("C:\\Users\\17400\\Desktop\\images\\22.jpg");
        OutputStream fos = new FileOutputStream("data\\23.jpg");
        System.out.println("可读取的字节数:"+fis.available());
        while (true){
            int data = fis.read();
            if(data==-1){
                break;
            }
            fos.write(data);
            fos.flush();
            System.out.println(data);
        }
        fis.close();
        fos.close();
    }
}
